import { createRouter, createWebHashHistory } from 'vue-router'


let routes = [
    // {
    //     path: "/login", component: () => import("../views/Login.vue"),
    //     children: [
    //         { path: "/login/login", component: () => import("../views/LoginLogin.vue") },
    //         { path: "/login/register", component: () => import("../views/LoginRegister.vue") }
    //     ]
    // },
    // { path: "/test", component: () => import("../views/test.vue")},
    // { path: "/public", component: () => import("../views/Public.vue")},
    // { path: "/register", component: () => import("../views/Register.vue")},
    // {
    //     path: "/blog", component: () => import("../views/Blog.vue"),
    //     children: [
    //         { path: "/blog/detail", component: () => import("../views/blog/BlogDetail.vue") }
    //     ]
    // },
    // { path: "/detail/", component: () => import("../views/blog/BlogDetail.vue"),},
    { path: "/blog-editor/", component: () => import("../views/user/BlogEditor.vue"),},
    { path: "/test/", component: () => import("../components/ArticleDetail.vue"),},
    { path: "/code42/", component: () => import("../views/state/Code42.vue"),},
    // { path: "/home", component: () => import("../views/Home.vue")},
    // { path: "/panel", component: () => import("../views/Panel.vue")},
    // // { path: "/upload", component: () => import("../components/UploadFile.vue")},
    { path: "/null", component: () => import("../views/state/Null.vue") },
    { path: "/blog/detail", component: () => import("../views/blog/BlogDetail.vue") },
    // {
    //     path: "/file", component: () => import("../views/File.vue"),
    //     children: [
    //         { path: "/file/upload", component: () => import("../views/UploadFile.vue") },
    //         { path: "/file/download", component: () => import("../views/DownloadFile.vue") },
    //     ]
    // },
    // {
    //     path: "/home",
    //     name: 'home',
    //     components: {
    //         a: () => import("../views/home/Home.vue"),
    //         b: () => import("../views/home/Home.vue")
    //     },
    // },
    { path: "/home", component: () => import("../views/home/Home.vue")},
    {
        path: "/backstage", component: () => import ("../views/user/Backstage.vue"),
        children: [
            { path: "/backstage/manage-blog", component: () => import("../views/user/ManageBlog.vue") },
            { path: "/backstage/manage-files", component: () => import("../views/user/ManageFiles.vue") },
            { path: "/backstage/manage-user", component: () => import("../views/user/ManageUser.vue") },
            { path: "/backstage/manage-data", component: () => import("../views/user/ManageData.vue") },
            { path: "/backstage/manage-app", component: () => import("../views/user/ManageAPP.vue") },
        ]
    }
]


const router = createRouter({
    history: createWebHashHistory(),
    routes
})


export { router, routes }